﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using ARS.Control.Interface;

namespace ARS.Control.Factory
{
    public class UserFactory
    {

        private class UserInfo:IUser
        {
             
        }

        public const string USER = "ARS.USER";
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <returns></returns>
        public static Interface.IUser CreateUser()
        {
            Interface.IUser iUser = ARS.PublicTool.WebHelper.DataCache.GetCache<Interface.IUser>(USER);
            if (iUser == null)
            {
//                string AssemblyPath = ConfigurationManager.AppSettings["UserInfoAssembly"];
//                string ClassNamespace = ConfigurationManager.AppSettings["UserInfoClass"];
//                object objType = ARS.PublicTool.ReflectionHelper.CreateObjectNoCache(AssemblyPath, ClassNamespace);
//                if (objType != null)
//                {
//                    return (Interface.IUser)objType;
//
//                }
                iUser = new UserInfo();
            }
            return iUser;

        }
    }
}
